﻿@model MMITWeb.Models.ChangePasswordViewModel

@{
    ViewBag.Title = "User Account: ChangePassword";

    AjaxOptions ajaxOpts = new AjaxOptions
    {
        UpdateTargetId = "response",
        LoadingElementId = "loading",
        LoadingElementDuration = 2000,
        Url = Url.Action("ChangePassword"),
        Confirm = "Are you sure you want to change your password?",
        OnSuccess = "window.location = '/UserAccount/ChangePasswordSuccess';"
        
    };
}
<div id="page" class="container">

<h2>Change Password</h2>
<div class="post" style="margin-left: 20px; font-size: smaller; text-align: justify">
            To change your password, Enter your Old and New password below. 
         <br />
            New passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length.

</div>
    
<div id="loading" style="display: none; color:Red; font-weight: bold" >
    <p style="vertical-align:top"><img src="@Url.Content("~/Content/Images/ajax-loader.gif")" alt="loading"/> Loading....</p>
</div>   
<div id="response">

</div>
<fieldset><legend>Change Password</legend>
@using(Ajax.BeginForm("ChangePassword", ajaxOpts))
{
    @Html.ValidationSummary(false)
    @Html.EditorForModel()
    <p><input type="submit" value="Change Password" class="t-button t-button-icontext" 
            style="border: none; height: 32px; cursor: pointer; margin-top: 20px" /></p>   

}

</fieldset>

</div>